package com.java.socket;

public class Group {
	private int gId;
	private String gName;
	public Group(int id, String name) {
		super();
		gId = id;
		gName = name;
	}
	public int getGId() {
		return gId;
	}
	public void setGId(int id) {
		gId = id;
	}
	public String getGName() {
		return gName;
	}
	public void setGName(String name) {
		gName = name;
	}
	
	public int hashCode(){
		return this.gName.hashCode()^this.gId^1000000;
	}
	public boolean equals(Object obj){
		if(obj instanceof Group){
			Group u1=(Group)obj;
			if(this.gName.equals(u1.gName)&&this.gId==u1.gId){
				return true;
			}
		}
		return true;
	}
}
